<template>
    <div class="aside-menu">
        <el-container>
            <el-aside width="150px">
                <el-menu default-active="Material" @select="onSelect">
                    <el-menu-item index="Material">
                        <span>材料合同</span>
                    </el-menu-item>
                    <el-menu-item index="Labor">
                        <span>班组合同</span>
                    </el-menu-item>
                    <el-menu-item index="MaterialDouble">
                        <span>双包合同</span>
                    </el-menu-item>
                    <el-menu-item index="Purchase">
                        <span>材料采购</span>
                    </el-menu-item>
                    <el-menu-item index="Settlement">
                        <span>结算</span>
                    </el-menu-item>
                </el-menu>
            </el-aside>
            <el-main>
                <component :is="Contract" v-if="value == 'Material'" type="Material" />
                <component :is="Contract" v-if="value == 'Labor'" type="Labor" />
                <component :is="Contract" v-if="value == 'MaterialDouble'" type="MaterialDouble" />
                <component :is="Purchase" v-if="value == 'Purchase'"/>
            </el-main>
        </el-container>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
const value = ref('Material')
import Contract from './components/contract.vue';
import Purchase from './components/purchase.vue';
const onSelect = (data: any) => {
    value.value = data
}
</script>

<style scoped>

</style>